package com.example.personaldemo.controller;

import com.example.personaldemo.entity.User;
import com.example.personaldemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/User")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/CreateAccount")
    @CrossOrigin
    public Integer save_account(@RequestBody User user)
    { return userService.save_account(user); }

}
